package com.dyoud.api.city.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dyoud.common.api.service.CityService;
import com.dyoud.core.ResponseBean;

@RestController
public class CityController {

    @Reference
    private CityService cityService;

    /**
     * 获取所有城市
     * @return
     */
    @RequestMapping(value = "/citys", method = RequestMethod.GET)
    public ResponseBean city() {
        return new ResponseBean().success(cityService.selectCity());
    }

}
